<!--title-->
<div class="mnav1">
	<div class="m_nav">
		<div class="nav_left">
			<em class="home_icon"><?=$this->sys_name?></em><span>&nbsp;&gt;&nbsp;</span><font><?=$this->title?></font>
		</div>
	</div>
</div>

<div class="content-table">
<div class="content-table-title"><?=$this->title?></div>
<br />
<?php if($this->msg):?>
<div class="replace"><?=$this->msg?></div>
<br />
<?php endif;?>
<?php if("LEVEL-3" == $_SESSION['identity']['level']):?>
<div align="center"><a href="/others/add-bu"><font color="green"><b>【新增BU】</b></font></a></div>
<br />
<?php endif;?>
<table>
  <tr>
    <th>名称</th>
    <th>负责人</th>
    <th>创建时间</th>
    <th>状态</th>
    <th>操作</th>
  </tr>
  <?php $data = $this->data['current_page_info'];?>
  <?php if($data["bu_name"]):?>
  <?php foreach($data["bu_name"] as $id => $something):?>
  <tr>
    <td><?=$data["bu_name"][$id]?></td>
	<td><?=$data["emp_name"][$id]?></td>
	<td><?=$data["ctime"][$id]?></td>
	<td><?php if(1==$data["status"][$id]){echo "<font color='green'>正常</font>";}else{echo "<font color='red'>冻结</font>";}?></td>
	<td>
		<?php if("LEVEL-3" == $_SESSION['identity']['level']):?>
			<button onclick="window.location.href='/others/edit-bu/bu_id/<?=$id?>'">编辑</button>
		<?php elseif("LEVEL-3" != $_SESSION['identity']['level'] && $data["emp_id"][$id] == $_SESSION['identity']['userid']):?>
			<button onclick="window.location.href='/others/my-bu/bu_id/<?=$id?>'">管理</button>
		<?php endif;?>
	</td>
  </tr>
  <?php endforeach;?>
  <?php endif;?>
</table>

<br /><br />
<div align="right"><?=$this->pagination?></div>
<br /><br /><br />